﻿@model Core.Models.Domain

@{
    ViewBag.Title = "Delete Domain";
    List<Core.NameId> lYesNo = Core.Tools.YesNo();
    List<Core.NameId> sllist = new List<Core.NameId>();
    sllist.Add(new Core.NameId("F", "Free"));
    sllist.Add(new Core.NameId("P", "Personal"));
    sllist.Add(new Core.NameId("B", "Business"));
    sllist.Add(new Core.NameId("E", "Enterprise"));    
}

<h1>@ViewBag.Title</h1>

@using (Html.BeginForm()) {

    <table width="90%" cellpadding="5" cellspacing="0" border="0">
    <tr>
        <td colspan="2">
            @Html.ValidationSummary(false)
        </td>
    </tr>
    <tr>
        <td width="50%" valign="top">
            <fieldset>
                <legend>Domain Info</legend>
                @Html.HiddenFor(model => model.DomainId)
                @Html.HiddenFor(model => model.PrimaryBU)

                <div class="display-label">
                    @Html.LabelFor(model => model.DomainName)
                </div>
                <div class="display-field">
                    @Html.DisplayFor(model => model.DomainName)
                </div>

                <div class="display-label">
                    @Html.LabelFor(model => model.SiteTitle)
                </div>
                <div class="display-field">
                    @Html.DisplayFor(model => model.SiteTitle)
                </div>

                <div class="display-label">
                    @Html.LabelFor(model => model.GoogleAnalyticsAccount)
                </div>
                <div class="display-field">
                    @Html.DisplayFor(model => model.GoogleAnalyticsAccount)
                </div>

                <div class="display-label">
                    @Html.LabelFor(model => model.IsMultiBUYN)
                </div>
                <div class="display-field">
                    @Core.Tools.YesNo(Model.IsMultiBUYN)
                </div>

                <div class="display-label">
                    @Html.LabelFor(model => model.EnableSelfRegisterYN)
                </div>
                <div class="display-field">
                    @Core.Tools.YesNo(Model.EnableSelfRegisterYN)
                </div>

                <div class="display-label">
                    @Html.LabelFor(model => model.ThemeId)
                </div>
                <div class="display-field">
                    @Model.Theme.Name
                </div>

                <div class="display-label">
                    @Html.LabelFor(model => model.MobileThemeId)
                </div>
                <div class="display-field">
                    @ViewBag.MobileTheme
                </div>

                <div class="display-label">
                    @Html.LabelFor(model => model.SubscriptionLevel)
                </div>
                <div class="display-field">
                    @sllist.First(m => m.Id == Model.SubscriptionLevel).Name
                </div>

                <div class="display-label">Create Date Time</div>
                <div class="display-field">@String.Format("{0:g}", Model.CreateDT)</div>

                <div class="display-label">Created By</div>
                <div class="display-field">@Model.CreatedByName</div>

                <div class="display-label">Modified Date Time</div>
                <div class="display-field">@String.Format("{0:g}", Model.ModifiedDT)</div>

                <div class="display-label">Modified By</div>
                <div class="display-field">@Model.ModifiedByName</div>    
            </fieldset>
        </td>
        <td width="50%" valign="top">
            <fieldset>
                <legend>SMTP Settings</legend>

                <div class="display-label">
                    @Html.LabelFor(model => model.SMTPServer)
                </div>
                <div class="display-field">
                    @Html.DisplayFor(model => model.SMTPServer)
                </div>

                <div class="display-label">
                    @Html.LabelFor(model => model.SMTPPort)
                </div>
                <div class="display-field">
                    @Html.DisplayFor(model => model.SMTPPort)
                </div>

                <div class="display-label">
                    @Html.LabelFor(model => model.SMTPUseSSLYN)
                </div>
                <div class="display-field">
                    @Core.Tools.YesNo(Model.SMTPUseSSLYN)
                </div>

                <div class="display-label">
                    @Html.LabelFor(model => model.SMTPFrom)
                </div>
                <div class="display-field">
                    @Html.DisplayFor(model => model.SMTPFrom)
                </div>

                <div class="display-label">
                    @Html.LabelFor(model => model.SMTPAccount)
                </div>
                <div class="display-field">
                    @Html.DisplayFor(model => model.SMTPAccount)
                </div>

                <div class="display-label">
                    @Html.LabelFor(model => model.SMTPPassword)
                </div>
                <div class="display-field">
                    @Html.DisplayFor(model => model.SMTPPassword)
                </div>

                <div class="display-label">
                    @Html.LabelFor(model => model.SMTPAllowSendYN)
                </div>
                <div class="display-field">
                    @Core.Tools.YesNo(Model.SMTPAllowSendYN)
                </div>
            </fieldset>
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <h2>Primary Business Unit</h2>
            <hr />
        </td>
    </tr>
    <tr>
        <td colspan="2">
            @Html.DisplayFor(model => model.PrimaryBusinessUnit)
        </td>
    </tr>
    <tr>
        <td colspan="2">
            &nbsp;
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <input type="submit" value="Delete" /> |
            @Html.ActionLink("Back to List", "Index")
        </td>
    </tr>
    </table>
}

